import request from "@/utils/request";

// 1.实时拥堵比较
export function congestionComparison(params?: any) {
    return request<{ currentSpeedIndex: number }>({
        url: "/v2/traffic-state/index/overview/congestionComparison",
        params,
    });
}

// 2.实时拥堵趋势比较
export function congestionTrendComparison(params?: any) {
    return request({
        url: "/v2/traffic-state/index/overview/congestionTrendComparison",
        params,
    });
}

// 3.路口拥堵概述
export function congestionOverview(params?: any) {
    return request({
        url: "/v2/traffic-state/junction/overview/congestionOverview",
        params,
    });
}

// 4.路口拥堵列表
export function junctionCongestionList(params?: any) {
    return request({
        url: "/v2/traffic-state/junction/overview/junctionCongestionList",
        params,
    });
}

// 5.link几何指标列表
export function lineStringIndexList(params?: any) {
    return request({
        url: "/v2/traffic-state/link/overview/lineStringIndexList",
        params,
    });
}

// 6.道路拥堵列表
export function gdRoadIndexList(params?: any) {
    return request({
        url: "/v2/traffic-state/link/overview/gdRoadIndexList",
        params,
    });
}

// 报警列表
export function giveAlarmList(params?: any) {
    return request({
        url: "/v2/traffic-state/junction/overview/giveAlarmList",
        params,
    });
}

// 道路指标列表
export function roadIndexList(params?: any) {
    return request({
        url: "/v2/traffic-state/road/overview/roadIndexList",
        params,
    });
}

export function webConfig() {
    return request({
        url: "/v2/traffic-state/common/common/webConfig",
    });
}
